'use strict';

const Controller = require('egg').Controller;

class test extends Controller {
  async init() {
    let {
      ctx,
      app
    } = this
    // ctx.logger.info('到daojjjjjjjjjjj', this.ctx.http)
    let model = this.app.model
    let Op = this.app.Sequelize;
    // console.log('-------000000000000----------', this.app.model.query)
    let res = await model.query(`
    SELECT *
    FROM hd_user_sign
    WHERE activity_id=308
    `,{
      type: Op.QueryTypes.SELECT
    })
    // console.log(ctx.service.http.Jinr, '---resffffff1111--------')
    let param = {
      method: 'activity.user.detail.by.userid',
      userid:"3549180"
    }
   let result =  await ctx.service.http.Jinr(param)
   let res1 = await app.redis.hget('153-returnTotalMoney','totalReturnMoney')
     console.log(app.redis.hget, '---result--------')
    ctx.body = {
      code: 10000,
      data:res1,
      msg: 'success'
    }
  }
}





module.exports = test;